<include file="public@header"/>
<style>
.breadcrumb {
  padding: 8px 15px;
  margin-bottom: 20px;
  list-style: none;
  background-color: #f5f5f5;
  border-radius: 4px;
  font-size: 20px;
}
.breadcrumb > li + li:before {
    color: #CCCCCC;
    content: "-> ";
    padding: 0 5px;
	font-size: 30px;
}
</style>
</head>
<body>
<div class="wrap js-check-wrap">
	<ol class="breadcrumb">
		<li><a href="{:url('Classroom/campus')}">{$campus['name']}</a></li>
		<li class="active">添加教室</li>
	</ol>
    <form action="{:url('Classroom/add_classroom_Post')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
        <div class="row">
            <div class="col-md-6">
                <table class="table table-bordered">
					<tr>
                        <th width="100px">所属校区<span class="form-required">*</span></th>
                        <td>
                            <select class="form-control" name="campus_id">
								{$campus_tree|default=''}
							</select>
                        </td>
                    </tr>
                    <tr>
                        <th width="100px">教室名称<span class="form-required">*</span></th>
                        <td>
                            <input class="form-control" type="text" name="name"
                                   id="name" required="required" value="{$param['name']|default=''}" placeholder="请输入教室名称"/>
                        </td>
                    </tr>
                    <tr>
                        <th>上课容量<span class="form-required">*</span></th>
                        <td>
                            <input class="form-control" type="text" name="max_count" id="max_count" value="{$param['max_count']|default=''}"
                                   placeholder="请输入上课最大容纳人数(默认30人)">
                        </td>
                    </tr>
                    <tr>
                        <th>考试容量</th>
                        <td>
						<span>
                            <input class="form-control" type="text" name="exam_count" id="exam_count" value="{$param['exam_count']|default=''}"
                                   placeholder="不填则默认等于上课容量">
							</span>
                        </td>
                    </tr>
                </table>
				
            </div>
            <div class="col-md-6">
			<table class="table table-bordered">
				<tr>
					<th>教室地图</th>
				</tr>
				<tr>
					<td>
						<div style="text-align: center;">
							<input type="hidden" name="map_img" id="thumbnail"
								   value="{$param['map_img']|default=''}">
							<a href="javascript:uploadOneImage('图片上传','#thumbnail');">
								<if condition="empty($param['map_img'])">
									<img src="__TMPL__/public/assets/images/default-thumbnail.png"
										 id="thumbnail-preview" width="150px;" style="cursor: pointer"/>
									<else/>
									<img src="{:cmf_get_image_preview_url($param['map_img'])}"
										 id="thumbnail-preview" width="150px;" style="cursor: pointer"/>
								</if>
							</a>
						</div>
					</td>
				</tr>
			</table>
            </div>
				<div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
                        <input class="btn btn-primary" type="button" value="返回" onclick="javascript:history.back(-1)"></input>
                    </div>
                </div>	
        </div>
    </form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>